// WorldServer Game.h

#ifndef GAME_H

#include "../Frame/TcpServer.h"
#include "../Frame/TcpClient.h"
#include "../Frame/Config.h"
#include "../Frame/Common.h"
#include "../Frame/Database.h"
#include "System/Login.h"
#include "MsgRounter.h"


#include <iostream>
#include <thread>
#include <fstream>

#define GAME_H


class Game
{
private:
	Game();
	Game(const Game&);

    TcpServer m_ServerSock;
    TcpClient m_ClientSock;

	MsgRounter m_MsgRounter;

	Login m_Login;
	//Database  m_GameDb;

    //std::list<Player> m_Player_lst; 				// Player list

    bool m_isEixt;

public:

	~Game();

public:
	static Game& GetInstance()
	{
		static Game Instance;
		return Instance;
	}

	void Init();

	void Dispose();

	void Exit();

	void GameLoop();

	//void SendMsg2Client(Message* _pMsg);

	TcpServer& GetSock();

	TcpClient& GetSockClient();

	Login& GetLogin();

protected:


};

#endif // GAME_H
